using System;
using Sinacor.Servico.Bovespa.Ordens.Service.DataContract.Request;
using Sinacor.Servico.Bovespa.Ordens.BusinessEntity;

namespace Sinacor.Servico.Bovespa.Ordens.Service.ServiceImplementation.Translator
{
    public static class TranslateBetweenConsultarJustificativasRequestAndJustificativa
    {
   
        public static Sinacor.Servico.Bovespa.Ordens.BusinessEntity.Justificativa TranslateConsultarJustificativasRequestToJustificativa(Sinacor.Servico.Bovespa.Ordens.Service.DataContract.Request.ConsultarJustificativasRequest from)
        {
            Sinacor.Servico.Bovespa.Ordens.BusinessEntity.Justificativa to = new Sinacor.Servico.Bovespa.Ordens.BusinessEntity.Justificativa();
            if (to.Ordem == null)
            to.Ordem = new Sinacor.Servico.Bovespa.Ordens.BusinessEntity.Ordem();
            to.Ordem.DataOrdem = from.DataOrdem;
            to.Ordem.NumeroOrdem = from.NumeroOrdem;
            to.Ordem.NumeroOrdemSubSequencia = from.NumeroSequenciaOrdem;
            return to;
        }
    }
}

